package com.mo.tools.exception;

/**
 * 具体业务错误异常
 *
 * @Author yuanhaifeng
 * @Time 2018/9/10 0016 11:20
 */
public class ServiceException extends Exception {

    /**
     * 错误消息
     */
    private String msg;

    /**
     * 错误代码
     */
    private String code;

    /**
     * 错误代码值
     */
    private String value;

    public ServiceException() {
    }

    public ServiceException(String message) {
        super(message);
        this.msg = message;
    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
        this.msg = message;
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }

    public ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.msg = message;
    }


    public ServiceException(String code, String message) {
        this.code = code;
        this.msg = message;
    }

    public String getMsg() {
        return msg;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

}
